<?php

namespace App\Models;



class AdminRole extends Base
{

    // [系统] 操作日志
    protected $table = 'admin_role';

    // 缓存字段，用于搜索绑定的字段
    protected $cacheFields = ['id', 'uid',];

    // 定义验证操作
    public function rules()
    {

        $add = [];

        $edit = [];

        $info = [];

        $rule = [
            'id'      => 'require|integer',
            'site_id' => 'require|integer',
            'uid'     => 'require|integer',
            'title'   => 'require|max:100',
            'url'     => 'require|max:200',
            'param'   => 'require|max:16777215',
            'remark'  => 'require|max:255',
            'count'   => 'require|integer',
            'ip'      => 'require|max:128',
            'date'    => 'require|integer',
            'ctime'   => 'require|integer',
            'mtime'   => 'require|integer',
        ];

        $msg = [
            'id'     => '自增量',
            'uid'    => '后台操作用户',
            'title'  => '操作目录',
            'url'    => '操作链接',
            'param'  => '链接参数',
            'remark' => '备注',
            'count'  => '操作次数',
            'ip'     => '操作IP',
            'date'   => '日期',
            'ctime'  => '创建时间',
            'mtime'  => '修改时间',
        ];

        return ['rule' => $rule, 'msg' => $msg, 'add' => $add, 'info' => $info];
    }

}


